package com.group2.bankonline.service.impl;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.group2.bankonline.pojo.Feedback;
import com.group2.bankonline.mapper.FeedbackMapper;
import com.group2.bankonline.service.IFeedbackService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author syf
 * @since 2024-07-15
 */
@Service
public class FeedbackServiceImpl extends ServiceImpl<FeedbackMapper, Feedback> implements IFeedbackService {

    @Override
    public List<Feedback> getFeedbackFromUser(int id, int status) {
        return baseMapper.selectByStatusAndPersonId(id,status);
    }

    @Override
    public List<Feedback> getFeedbackAnswer(int status) {
        return baseMapper.selectByStatus(status);
    }

    @Override
    public int updateFeedback(String feedback, int status, int id) {
        return baseMapper.updateFeedback(feedback,status,id);
    }

}
